<?xml version="1.0"?>
<xsl:stylesheet version="1.0" 
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 

    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:rpm="tag:inf.unideb.hu,2006:ontologies/rpm#"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:dcterms="http://purl.org/dc/terms/"
       
   xmlns:s="service:nepmomuk.sandbox" 
   xmlns:atom='http://www.w3.org/2005/Atom'>
<xsl:output method="html" />
<xsl:template match="/">
    <html>
      <head>
        <title><xsl:value-of select="/atom:feed/atom:title"/></title>       
        <style>
            .rpm { padding: 0.1em; margin: 0 0.5em; }
            .rpm-name { border-bottom: 1px solid gray; } 
            .rpm-summary { color: gray; font-size: smaller; } 
            .rpm-description { } 
            table.rpm-details,
            table.rpm-details tr,
            table.rpm-details tr th,
            table.rpm-details tr td { border: 1px solid gray; padding: 0.5em; }
            table.rpm-details { border-collapse: collapse; }
            table.rpm-details th { text-align: right; }
            
            .rpm-changelog { }
            .rpm-changeentry { margin: 0.5em 0 0 0; }
            .rpm-changeentry .rdfs-comment { margin: 0 0.5em; }
            .rpm-changeentry .dcterms-created { color: green; margin: 0 0.5em; }
            .rpm-changeentry .dc-creator { color: navy; }
        </style>
      </head>
    <body>
        <div  class='rpm'>
            <h1 class='rpm-name'><xsl:value-of select="/rdf:RDF/rdf:Description/rpm:name"/></h1>
            <blocquot class='rpm-summary'>
                <xsl:value-of select="/rdf:RDF/rdf:Description/rpm:summary"/>
            </blocquot>
            <p class='rpm-description'>
                <xsl:value-of select="/rdf:RDF/rdf:Description/rpm:description"/>
            </p>
            <table class='rpm-details'>
                <tr><th>Size</th><td><xsl:value-of select="/rdf:RDF/rdf:Description/rpm:size"/></td></tr>
                <tr><th>License</th><td><xsl:value-of select="/rdf:RDF/rdf:Description/rpm:license"/></td></tr>
                <tr><th>OS</th><td><xsl:value-of select="/rdf:RDF/rdf:Description/rpm:os"/></td></tr>
                <tr><th>Buildhost</th><td><xsl:value-of select="/rdf:RDF/rdf:Description/rpm:buildhost"/></td></tr>
            </table>
            <h2>Dependencies</h2>
            <ul>
            <xsl:for-each select="/rdf:RDF/rdf:Description/rpm:depends">
                <li><xsl:value-of select="./rdfs:label"/></li>
            </xsl:for-each>
            </ul>
            <h2>Changelog</h2>
            <ul class='rpm-changelog'>
                <xsl:for-each select="/rdf:RDF/rdf:Description/rpm:changeLog/rdf:Seq/rdf:li">
                    <li class='rpm-changeentry'>
                        <div class='rdfs-comment'><xsl:value-of select="./rdfs:comment"/></div>
                        <div class='dcterms-created'><xsl:value-of select="./dcterms:created"/></div> 
                        <div class='dc-creator'><xsl:value-of select="./dc:creator"/></div>
                    </li>
                </xsl:for-each>
            </ul>
        </div>
    </body>
    </html>
</xsl:template>

</xsl:stylesheet> 